

jQuery(function ($) {
    var user = JSON.parse(localStorage.getItem('user_info')) || {};
    var user_name = user.user_name;
    if (user_name) {
        $('.login_register').css('display', 'none');
        $('.user_name_block').css('display', 'block');
        $('.user_name').text(user_name);
    }
    $('.go_back').click(function () {
        window.localStorage.removeItem('user_info');
        window.localStorage.removeItem('noUsers');
        window.localStorage.removeItem('address');
        window.location.reload();
    });
    //去注册  
    $("#header-r").click(function () {
        window.location.href = "/login/register.html";
    });
    //短息密码登录
    $(".sms_login").click(function () {
        window.location.href = "/login/sms_login.html";
    });
    //切换到密码登录
    $(".code_login").click(function () {
        window.location.href = "/login/login.html";
    });
    //忘记密码
    $(".forget_password").click(function () {
        window.location.href = "/login/forget_pw.html";
    });
    $(".please_login").click(function () {
        window.location.href = "/login/login.html";
    });
    $(".please_register").click(function () {
        window.location.href = "/login/register.html";
    });
    $(".back_login").click(function () {
        window.location.href = "/login/login.html";
    });
    $(".header-r").click(function () {
        window.location.href = "/login/login.html";
    });
    $(".go_car").click(function () {
        window.location.href = "/goods/shop_car.html"
    });
});